package com.java.asvitelskyy.company;

public class HourWorker extends Worker {

    private int time;

    public HourWorker(String name, int id, int time) {
        super(name, id);
        this.time = time;
    }

    public String getWorker() {
        return String.format("%8s | %8s | %8s |", getId(), getName(), calcSalary());
    }

    @Override
    public int calcSalary() {
        return 20 * 8 * this.time;
    }
}
